<%--
  Created by IntelliJ IDEA.
  User: GUYUE
  Date: 2022/11/24
  Time: 9:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
  <title>订单管理</title>
  <base href="<%=basePath%>">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- 引入 Bootstrap -->
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

  <!-- HTML5 Shiv 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
  <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  <![endif]-->
</head>
<body >
<table class="table table-striped">
  <caption>订单详情</caption>
  <thead>
  <tr>
    <th>订单编号</th>
    <th>订单时间</th>
    <th>状态</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${order}" var="o">
    <tr>
      <td>${o.oNumber}</td>
      <td>${o.ordertime}</td>
      <c:if test="${o.state==1}">
        <td>已完成</td>
      </c:if>
      <c:if test="${o.state==0}">
        <td>未完成</td>
        <td><a href="/Order.let?type=centerPay&oNumber=${o.oNumber}">付款</a></td>
      </c:if>
      <td><a href="/Order.let?type=queryOrderDetail&oNumber=${o.oNumber}">详情</a></td>
    </tr>
  </c:forEach>
  </tbody>
</table>

<!-- jQuery (Bootstrap 的 JavaScript 插件需要引入 jQuery) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- 包括所有已编译的插件 -->
<script src="../assets/js/bootstrap.min.js"></script>
</body>
</html>
